<?php
/**
 * Created by PhpStorm.
 * Author: D H
 * Date: 2017/6/16
 * Time: 14:14
 */
namespace app\android\controller;
use app\api\logic\Fire as Fires;
use think\Request;
use tool\Common;

class Fire extends Base {
    //得到消防宝典分类
    public function getBibleType(){
        /*$data = json_decode(Request::instance()->getInput(),true);
        $object = new Fires();
        $package = $object->init($data)->getBibleType();
        Common::json($package);
        //dump($package);*/

        return json((new Fires($this->request))->getBibleType());
    }

    //根据类型ID得到消防宝典视频列表
    public function getBibleListByTypeID(){
        return json((new Fires($this->request))->getBibleListByTypeID());
    }

    //根据消防ID得到消防宝典详细信息
    public function getFireMsgByFireID(){
        return json((new Fires($this->request))->getFireMsgByFireID());
    }
    //得到消防宝典全部评论
    public function getFireCommentsByFireID(){
        return json((new Fires($this->request))->getFireCommentsByFireID());
    }
    //发表评论
    public function publishFire(){
        return json((new Fires($this->request))->publishFire());
    }

    //得到回复
    public function getReply(){
        return json((new Fires($this->request))->getReply());
    }

    //根据消防宝典ID得到评论
    public function getMoreComments(){
        return json((new Fires($this->request))->getMoreComments());
    }

    //新闻与我相关
    public function relatedForMe()
    {
        return json((new Fires($this->request))->relatedForMe());
    }
}